﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="NhaplieuExcel.aspx.cs" Inherits="_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <div class="row-fluid none_print">
                <div class="span12">
                    <div class="box">
                        <div class="box-title">
                            <h3><i class="icon-cloud-upload"></i>
                                <asp:Label ID="lblthongtinchung" runat="server" Text="Nhập liệu tự động"></asp:Label></h3>
                            <div class="box-tool">
                                <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
                                <a data-action="close" href="#"><i class="icon-remove"></i></a>
                            </div>
                        </div>

                        <div class="box-content">
                            <fieldset>
                                <legend>Thông tin nhập liệu</legend>
                                <div style="width: 100%;">
                                    <div class="button_sign" style="float: left;">
                                        Tên bảng:<asp:TextBox ID="txtsheetname" runat="server" placeholder="Nhập tên Sheet" Height="14px"></asp:TextBox>
                                        <asp:LinkButton ID="btn" runat="server" class="btn btn-warning" OnClick="btn_Click"><i class="icon-cloud-upload"> Tải lên</i></asp:LinkButton>
                                        <asp:FileUpload ID="file" runat="server" />
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" Display="Dynamic" runat="server" ForeColor="Red" ControlToValidate="file" ErrorMessage="File không đúng định đạng (Chỉ cho phép tải các file dạng: .xls, .xlsx)" ValidationExpression="^([0-9a-zA-Z_\-~ :\\])+(.xls|.XLS|.xlsx|.XLSX)$"></asp:RegularExpressionValidator>
                                    </div>
                                    <asp:Label ID="lblerror" runat="server" class="input-block-level"></asp:Label>
                                </div>
                            </fieldset>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
            <div style="height: 10px; width: 100%"></div>
            <div id="print_up">
                <asp:Panel ID="pndetail" runat="server" Visible="false">
                    <div class="row-fluid ">
                        <div class="span12">
                            <div class="box box-black">
                                <div class="box-title none_print">
                                    <h3 style="color: white;"><i class="icon-file"></i>Danh sách xem trước</h3>
                                    <div style="float: right;">
                                        <span style="color:white;">
                                            Chọn đơn vị
                                            <asp:DropDownList ID="drldonvi" runat="server" Height="25px"></asp:DropDownList>
                                        </span>
                                        <asp:LinkButton ID="btnImport" Visible="true" runat="server" class="btn btn-lime" ToolTip="Lưu danh sách vào cơ sở dữ liệu" OnClick="btnImport_Click"><i class=" icon-suitcase"></i> Lưu vào database</asp:LinkButton>
                                        <asp:Label ID="lblthongbao" runat="server" ForeColor="White"></asp:Label>
                                    </div>
                                </div>

                                <div class="print_area box-content">
                                    <asp:Label ID="lbltrangthai" runat="server"></asp:Label>
                                    <asp:UpdateProgress ID="udtprogress" runat="server" AssociatedUpdatePanelID="UpdatePanel2">
                                        <ProgressTemplate>
                                            <div style="padding-bottom: 10px;">
                                                <img src="../img/loading1.gif" width="30" height="25" />
                                                <span style="color: red; font-style: italic;">&nbsp;Đang xử lý dữ liệu...Xin chờ trong giây lát!</span>
                                                <br />
                                            </div>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                    <!--table bao cao-->
                                    <div class="row-fluid row_scroll" style="overflow-x: scroll; overflow-y: hidden; padding-bottom: 10px;">

                                        <div class="GridDock_paging" id="dvGridWidth">

                                            <asp:GridView ID="grid" Width="100%" runat="server" CellPadding="4" CaptionAlign="Left" ForeColor="#333333" HorizontalAlign="Center" ShowFooter="True" OnRowCreated="grid_RowCreated" ShowHeader="False" OnDataBound="grid_DataBound">
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                <EditRowStyle BackColor="#999999" />
                                                <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" Wrap="False" />
                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                <PagerSettings Position="TopAndBottom" />
                                                <PagerStyle HorizontalAlign="Left" CssClass="GridPaging" VerticalAlign="Middle" Wrap="False" />
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" Wrap="False" />
                                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                            </asp:GridView>
                                            <div style="height: 5px; width: 100%;"></div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </asp:Panel>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btn" />
        </Triggers>
    </asp:UpdatePanel>

    <div style="height: 700px; width: 100%" class="none_print"></div>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#dvGridWidth').width($('#dvScreenWidth').width());
        });
    </script>

</asp:Content>

